<layout name='Layout/public' />
<div class="col-sm-6 pull-right">
    <button class="btn btn-sm btn-primary pull-right" onclick="javascript:window.location.href = '?m={$mod}&a=add'">
        新增
        <i class="icon-reply icon-only"></i>
    </button>
</div>
{:W('PageHeader',array('name'=>$action_name))}

<div class="row">
    <div class="col-xs-12">
        <!-- PAGE CONTENT BEGINS -->
        <div class="row">
            <div class="col-xs-12">
                <table id="sample-table-1" class="table table-bordered table-hover">
                    <thead>
                        <tr>
                            <th>序号</th>
                            <th>角色名称</th>
                            <th>角色描述</th>
                            <th>状态</th>
                            
                            <th>操作</th>
                        </tr>
                    </thead>

                    <tbody>
                    <foreach name="data" item="v">
                        <tr>  
                            <td>{$v.id}</td>
                            <td>{$v.rolename}</td>
                            <td>{$v.description}</td>
                            <td><if condition="$v.status eq 1">启用<else/>禁用</if></td>
                            <td>
                                <div class="btn-group">
                                   
                                    <button class="btn btn-xs btn-info" onclick="window.location.href = '?m={$mod}&a=add&id={$v.id}'">
                                        <i class="ace-icon fa fa-pencil bigger-120" ></i>
                                    </button>
                                    <button class="btn btn-xs btn-danger" onclick="alert_del('?m={$mod}&a=del&id={$v.id}','确认要删除『{$v.rolename}』吗？')">
                                        <i class="ace-icon fa fa-trash-o bigger-120"></i>
                                    </button>
                                </div>

                             
                            </td>
                        </tr>
                    </foreach>


                    </tbody>
                </table>

                <div class="row">
                    <div class="col-sm-2">
                        <div class="dataTables_info" id="sample-table-2_info">
                            共:{:count($data)}条记录
                        </div>
                    </div>
                    <div class="col-sm-10">
                        <div class="dataTables_paginate paging_bootstrap">
                            <ul class="pagination">
                                {$page}
                            </ul>
                        </div>
                    </div>
                </div>  

            </div><!-- /.span -->
        </div><!-- /.row -->




        <!-- PAGE CONTENT ENDS -->
    </div><!-- /.col -->
</div><!-- /.row -->

